package com.container.app.tests.properties;

import com.container.app.MContainer;
import com.container.app.MContainerManager;
import com.container.app.testclasses.movies.ContainsImplementations;
import junit.framework.TestCase;

/**
 * Created with IntelliJ IDEA.
 * User: Georgiana.Scarlat
 * Date: 8/7/12
 * Time: 10:40 AM
 */
public abstract class AbstractTestWithProperties extends TestCase {

    protected MContainer container;

    public AbstractTestWithProperties(String name) {
        super(name);
    }

    @Override
    public void setUp() throws Exception {
        super.setUp();
        ContainsImplementations.setMovieFinder(null);
        ContainsImplementations.setMovieLister(null);
        container = new MContainerManager("startup.properties", null);
    }

    @Override
    public void tearDown() throws Exception {
        super.tearDown();
        container.closeContainer();
        ContainsImplementations.setMovieFinder(null);
        ContainsImplementations.setMovieLister(null);
    }
}
